package cn.cycleif.app.controller;

import cn.cycleif.app.service.RevisionService;
import cn.cycleif.enums.ObjectTypeEnum;
import cn.cycleif.util.R;
import cn.dev33.satoken.annotation.SaIgnore;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date: 25/2/18-12:52
 * @Desc:
 */
@RequestMapping("/api/revision")
@Tag(name = "修订历史")
@RestController
@SaIgnore
public class RevisionController {

  @Autowired
  private RevisionService revisionService;

  @GetMapping()
  @Operation(summary = "获取修订历史")
  public R<Object> getList(
      @RequestParam("type") Integer type,
      @RequestParam("id") Integer id
  ) {
    return revisionService.getList(type, id);
  }
}
